Skip to content

feat(readiness): commander-facing readiness overview as the staff home - #16

Merged
dalpan merged 1 commit into
fix/ui-reviewfrom
feature/readiness-dashboard
Oct 30, 2026
Merged

dalpan merged 1 commit into
fix/ui-reviewfrom
feature/readiness-dashboard

Conversation

@dalpan

@dalpan dalpan commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Stacked on #15 — base is fix/ui-review so this diff shows only the readiness work. Merge #15 first; GitHub then retargets this PR to main.

Summary

A single screen that tells the Pretexta story — measure → remediate → retest — for a commander or trainer. It becomes / for admins and trainers; Command Center moves to /command.

Backend — GET /api/readiness (trainer/admin; admins see all orgs, trainers their own, same scoping as live campaigns)

  • Readiness index (0–100) with its components and weights exposed: report rate 40%, did-not-click 20%, average principle resistance 20%, Inbox Triage score 20%. Components without data are dropped and the weights renormalised, so a lab-only org still gets a meaningful number.
  • Report-rate trend over the last 8 launched campaigns, with the first→latest delta.
  • Remediation loop counts: remediation assigned / passed, retest assigned / passed.
  • Average resistance per Cialdini principle across the cohort + the two weakest.
  • Lab discrimination: average triage d′ and score.
  • Attack-surface posture (DEFCON) and the easiest crown jewel, when the org has a map.

Privacy (G13) — everything is cohort-level. The activity feed returns only source / principle / status / created_at (no person, no free-text reason); the top attack path shows the asset, not the entry person.

Frontend — ReadinessPage: gauge with the visible formula, report-rate trend (Recharts), 4-step loop funnel, principle radar, posture card, lab card, anonymous feed. EN/ID strings; remaining hard-coded nav labels now go through i18n.

Test plan

  • pytest — 210 passed; new tests/test_readiness.py: staff-only, empty org, index + loop math, trainer org isolation, weight renormalisation, feed has no identifying fields
  • ruff check / ruff format --check
  • CI=true craco build
  • Rebuilt the docker stack and checked the page with a Playwright screenshot (admin, ID locale)

🤖 Generated with Claude Code

One screen that tells the measure -> remediate -> retest story:

- GET /api/readiness (trainer/admin, org-scoped like live campaigns):
  readiness index with its components and weights, report-rate trend over
  the last campaigns, remediation-loop funnel, average resistance per
  Cialdini principle, lab discrimination (Inbox Triage d'), and the
  attack-surface posture with the easiest crown jewel.
- The index is transparent: report rate 40%, did-not-click 20%, principle
  resistance 20%, triage 20%; components without data are left out and
  the weights renormalised.
- Cohort-level only (G13): the activity feed carries source, principle,
  status and date — no person, no free-text reason; the top attack path
  shows the asset, not the entry person.
- ReadinessPage becomes "/" for admins and trainers; Command Center moves
  to /command. Remaining hard-coded nav labels go through i18n.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dalpan
dalpan merged commit fc63d0f into fix/ui-review Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant